package com.matt.domain.nursery;

import com.matt.commons.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * *******************************
 * 托班排课
 * Created by lch.
 * form com.matt
 * on 2018/11/26
 * *******************************
 */
@Entity
@Table(name = "nursery_schedule")
@Data
@EqualsAndHashCode(callSuper = true)
public class NurserySchedule extends Domain {

    @Column(columnDefinition = "varchar(32) COMMENT '班级id'")
    private String classesId;

    @Column(columnDefinition = "varchar(32) COMMENT '学生id'")
    private String childrenId;

    @Column(columnDefinition = "varchar(32) COMMENT '教师id'")
    private String teacherId;

    @Column(columnDefinition = "varchar(32) COMMENT '园区id'")
    private String areaId;

    @Column(columnDefinition = "int DEFAULT 0 COMMENT '排课状态 0：未排 1：已排'")
    private Integer status=0;

    @Column(columnDefinition = "int DEFAULT 0 COMMENT '课程类型 0：非主题课 1：包含主题课'")
    private Integer courseType=0;

    @Column(columnDefinition = "datetime COMMENT '上课时间'")
    private Date lessonDate;

    public static NurserySchedule of(String classesId,Integer status,Date lessonDate){
        NurserySchedule vo = new NurserySchedule();
        vo.setClassesId(classesId);
        vo.setLessonDate(lessonDate);
        vo.setStatus(status);
        return vo;
    }
}
